<template>
  <div>
    <div class="box"></div>
    <div class="loginBox">
      <p class="title">找回密码</p>
      <el-form :model="user" status-icon :rules="rules" ref="user" label-width="50px" class="demo-ruleForm">
        <el-form-item label="账号" prop="user">
          <el-input type="text" v-model="user.account" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="电话" prop="pass">
          <el-input type="password" v-model="user.pass" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <el-button class="btn">提交</el-button>
      <el-button class="btn" @click="toLogin">返回</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      Login: 'login',
      user: {
        account: '',
        pass: ''
      },
      rules: {
        user: [
          { min: 3, max: 10, message: '长度在 3 到 5 个字符', trigger: 'blur' }
        ],
        pass: [
          { min: 6, max: 11, message: '长度在 3 到 5 个字符', trigger: 'blur' }
        ]
      }
    }
  },
  methods: {
    toLogin () {
      this.$bus.$emit('title', this.Login)
    }
  }
}
</script>
<style lang="less" scoped>
.box{
  width: 300px;
  height: 400px;
  background-color: rgba(250, 235, 215, 0.639);
  background-image: url('https://img0.baidu.com/it/u=2042637590,3523032130&fm=253&fmt=auto?w=1200&h=800');
  background-size: 240%;
  background-position: -200px;
  background-repeat: no-repeat;
  display: inline-block;
}
.loginBox{
  width: 260px;
  height: 400px;
  overflow: hidden;
  padding: 20px;
  display:inline-block;
  background-color: rgb(242, 242, 243);
  p{
    font-size: 10px;
  }
  .title{
    padding: 15px;
    padding-left: 50px;
    font-size: 39px;
    width: 300px;
    // margin-left: 70px;
    // margin-top: 10px;
  }
  .demo-ruleForm{
    margin-top: 30px;
  }
  .btn{
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .fot{
    margin-top: 40px;

  }
}
button{
  border: 0px;
}
</style>
